/**
 * author:Administrator
 * date:2015/7/27
 * desc:TODO
 */

'use strict';

let __type = 'article';
let __mapping = {
  "article": {
    "_all": {
      "indexAnalyzer": "ik_smart",
      //"searchAnalyzer": "ik_smart",
      "term_vector": "with_positions_offsets_payloads",
      "store": "false"
    },
    "properties": {
      "articleContent": {
        "type": "string",
        "store": "no",
        "term_vector": "with_positions_offsets_payloads",
        "indexAnalyzer": "ik_smart",
        "searchAnalyzer": "ik_smart",
        "include_in_all": "true",
        "boost": 8
      },
      "uid": {"type": "integer", "index": "not_analyzed", "include_in_all": false},
      "vest": {"type": "integer", "index": "not_analyzed", "include_in_all": false},
      "tid": {"type": "integer", "index": "not_analyzed", "include_in_all": false},
      "cid": {"type": "integer", "index": "not_analyzed", "include_in_all": false},
      "cid2": {"type": "integer", "index": "not_analyzed", "include_in_all": false},
      // 0用户分类,1人工,2机器
      "ctype": {"type": "integer", index: "not_analyzed", "include_in_all": false},
      "imgcount": {"type": "integer", index: "not_analyzed", "include_in_all": false},
      "views": {"type": "integer", "index": "not_analyzed", "include_in_all": false},
      "liketimes": {"type": "integer", "index": "not_analyzed", "include_in_all": false},
      "replies": {"type": "integer", "index": "not_analyzed", "include_in_all": false},
      "userreplies": {"type": "integer", "index": "not_analyzed", "include_in_all": false},
      "status": {"type": "integer", "index": "not_analyzed", "include_in_all": false}, //0=无效, 1=有效
      "timeline": {"type": "long", "index": "not_analyzed", "include_in_all": false}, //日期要用long
      "lastpost": {"type": "long", "index": "not_analyzed", "include_in_all": false}
    }
  }
};

// uid, vest, tid, articleContent,cid,cid2, timeline, lastpost,views, liketime,status,replies,userreplies,ctype
module.exports = {
  type: __type,
  idFieldName: 'tid',
  mapping: __mapping
};
